<div id="registration">
	<?php echo $this->Form->create('Hoso', array('inputDefaults' => array('error' => false),'id'=>'DuyetHoso')); ?>
	<div class="title">Kiểm tra và tiếp nhận hồ sơ</div>
	<div id="generalInfo">
		<p>
			<span class="title">Thủ tục hành chính</span>
			<span><input disabled="true" value="<?php echo $hoso['Tthc']['ten']?>" style="width: 638px;"/></span>
		</p>
		<p>
			<span class="title">Họ tên</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['ten'];?>" size="20"/></span>
			<span class="title2">Email</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['email'];?>" style="width: 388px;"/></span>
		</p>
		<p>
			<span class="title">Số CMND</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['so_cmt'];?>"/></span>
			<span class="title2">Ngày Cấp</span></span>
			<span><input disabled="true" value="<?php echo $this->Time->format('d/m/Y', $hoso['Hoso']['ngay_cap']);?>"/></span>
			<span class="title2">Nơi Cấp</span>
			<span><input disabled="true" value="<?php echo $thanhPhos[$hoso['Hoso']['noi_cap']];?>"/></span>
		</p>
		<p>
			<span class="title">Số điện thoại</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['mobile'];?>"/></span>
			<span class="title2">Địa chỉ</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['dia_chi'];?>"/></span>
		</p>
	</div>
	<div id="thanhphan">
		<?php if ($hoso['Hoso']['loai'] == 1): ?>
		<table width="100%" cellspacing="0">
			<tr>
				<td style="width: 50px;">STT</td>
				<td>Thành phần hồ sơ</td>
				<td>File đính kèm</td>
			</tr>
			<?php foreach ($attachments as $key => $attachment):?>
				<tr>
					<td align="center"><?php echo $key + 1;?></td>
					<td><?php echo $attachment['ThanhPhan']['ten'];?></td>
					<td><a href="<?php echo FULL_BASE_URL.'/files/'.$attachment['Attachment']['code']?>" target="_blank"><?php echo $attachment['Attachment']['original_name'];?></a></td>
				</tr>
			<?php endforeach ?>
		</table>
		<?php endif; if ($hoso['Hoso']['loai'] == 2): ?>
		<table width="100%" cellspacing="0">
			<tr>
				<td style="width: 50px;">STT</td>
				<td>Thành phần hồ sơ</td>
			</tr>
			<?php foreach ($thanhPhans as $key => $thanhPhan):?>
				<tr>
					<td align="center"><?php echo $key + 1;?></td>
					<td><?php echo $thanhPhan['ThanhPhan']['ten'];?></td>
				</tr>
			<?php endforeach ?>
		</table>
		<?php endif ;?>
		<div style="margin-top: 20px;">
			<p>
				<span class="title">Số bộ hồ sơ</span>
				<span><input disabled="true" value="<?php echo $hoso['Tthc']['sobohoso'];?>" size="20"/></span>
			</p>
			<p>
				<span class="title">Phí dịch vụ: </span>
				<span><input disabled="true" value="<?php echo number_format($hoso['Tthc']['le_phi']);?>" size="20"/></span>
			</p>
			<p>
				<span class="title">Ngày hẹn trả<span class="required">*</span></span>
				<span><input type="text" id="HosoNgayTra" size="20" readonly="readonly" name="data[Hoso][ngay_tra]"  value="<?php echo $hoso['Hoso']['ngay_tra'];?>"/></span>
			</p>
			<p>
				<span style="height: 23px;" class="title">Về việc</span>
				<span style="margin-right: 0px;"><textarea id="HosoGhiChu" style="width: 810px; height: 34px;" name="data[Hoso][ghi_chu]"><?php echo $hoso['Hoso']['ghi_chu']?></textarea></span>
			</p>
			<div class="clear"></div>
		</div>
	</div>
	<hr style="color: #1F7BC3;" />
	<div id="buttons">
		<?php echo $this->Html->link('Thoát',array('action' => 'kiemduyet',$selectedHoso), array('id' => 'back', 'class' => 'button blue'));?>
		<div class="clear"></div>
	</div>
    <input type="hidden" name="data[Hoso][id]" value="<?php echo $hoso['Hoso']['id'];?>"/> 
	<?php echo $this->Form->end();?>
</div>
<script type="text/javascript">
	var form = $("#DuyetHoso");
	$(document).ready(function (){
		$("#duyet").click(function () {submit('xemHoso',form);});
		$("#back").click(function () {submit('back',form);});
		$("#HosoNgayTra").datepicker({dateFormat:"dd/mm/yy" });
	});
</script>